# Contributor: Taner Tas <taner76@gmail.com>
# Maintainer: Taner Tas <taner76@gmail.com>
pkgname=snes9x
pkgver=1.60
pkgrel=1
pkgdesc="Super NES Emulator"
options="!check" # No testsuite
url="http://www.snes9x.com"
arch="all"
license="custom"
makedepends="
	meson
	glib-dev
	sdl2-dev
	gtk+3.0-dev
	libxrandr-dev
	libepoxy-dev
	wayland-dev
	libxv-dev
	portaudio-dev
	alsa-lib-dev
	libpng-dev
	minizip-dev
	zlib-dev
	"
subpackages="$pkgname-lang"
source="$pkgname-$pkgver.tar.gz::https://github.com/snes9xgit/snes9x/archive/$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver/gtk"

build() {
	meson \
		--prefix=/usr \
		--buildtype=plain \
		-Dopengl=true \
		-Dgtk3=true \
		-Dpulseaudio=false \
	. output
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
	ln -s snes9x-gtk "$pkgdir"/usr/bin/snes9x
}

sha512sums="840b006a8fbd479fd5ceb2d94af4ef6470c5e27a3e6c8ddb0dffc8d3e51f465669144cd428bfce28b2ed4f68e70d8f252f2d8a2cae602ba797791d7e483c14c9  snes9x-1.60.tar.gz"
